<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
<script type="text/javascript" src="../lib/html5.js"></script>
<script type="text/javascript" src="../lib/respond.min.js"></script>
<script type="text/javascript" src="../lib/PIE_IE678.js"></script>
<![endif]-->
    <link href="../lib/layui/css/layui.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.min.css" rel="stylesheet" type="text/css" />
    <link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css" />
    <link href="../lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
    <link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
    <!--[if IE 6]>
<script type="text/javascript" src="../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
    <title>品种追溯信息管理</title>
</head>
<body>
    <div class="pd-20">
        <form id="itemEdit" name="itemEdit" method="post" action="../ashx/spui.ashx" class="form form-horizontal">
            <input type="hidden" class="actionValue" id="editAction" name="action" value="add" />
            <input type="hidden" id="id" name="id" />
            <input type="hidden" id="tablename" name="tablename" value="" />
            <input type="hidden" id="tablemidname" name="tablemidname" value="" />
            <input type="hidden" id="ftype" name="ftype" value="15" />
            <input type="hidden" id="fmaintype" name="fmaintype" value="15" />
            <input type="hidden" id="ftypename" name="ftypename" value="品种追溯信息管理" />
            <input type="hidden" id="dataneedtouser" name="dataneedtouser" value="1" /><!--是否要包含通用数据必归属处理-->
            <input type="hidden" id="ywcheckonly" name="ywcheckonly" value="ftype,fmaintype,ffv1,ffv3#当前种值物-基地信息已存在!" /><!--唯一性检查 所用字段要在表单中-->
            <div class="row cl">
                <label class="form-label col-1">基地：</label>
                <div class="formControls col-2">
                    <span class="select-box">
                        <select class="select" size="1" name="ffv1" id="ffv1">
                        </select></span>
                    <input type="hidden" name="ffv2" id="ffv2" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-1">品种：</label>
                <div class="formControls col-2  layui-form">
                    <select class="select" name="ffv3" id="ffv3" lay-filter="layseltasksctype" lay-verify="required" nullmsg="不能为空" datatype="*1-22" lay-search="">
                        <option value="">直接选择或搜索选择</option>
                    </select>
                    <input type="hidden" id="ffv4" name="ffv4" value="" />
                </div>
                <div class="col-1"></div>

            </div>

            <div class="row cl">
                <label class="form-label col-1">简介：</label>
                <div class="formControls col-9">
                    <input type="text" class="input-text" name="ffv5" id="ffv5" placeholder="产品介绍" />
                </div>
                <div class="col-1"></div>

            </div>
            <div class="row cl">
                <label class="form-label col-1">负责人：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="ffv6" id="ffv6" placeholder="农场负责人" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-1">名称：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="ffv7" id="ffv7" placeholder="农场名称" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-1">地址：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="ffv8" id="ffv8" placeholder="农场地址" />
                </div>
                <div class="col-1"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">基地面积：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="ffv9" id="ffv9" placeholder="基地面积" />
                </div>
                <div class="col-1"></div>
                <label class="form-label col-1">种植面积：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="ffv10" id="ffv10" placeholder="种植面积" />
                </div>
                <div class="col-1"></div>
                 <label class="form-label col-1">栽培品种：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="ffv11" id="ffv11" placeholder="栽培品种" />
                </div>
                <div class="col-1"></div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">图片名称：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfoname1" id="faddinfoname1" placeholder="如：产品检测报告" />
                </div>

                <label class="form-label col-1">图片ID：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfo1" id="faddinfo1" placeholder="如：40" />
                </div>
                <label class="form-label col-1">图片名称：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfoname2" id="faddinfoname2" placeholder="如：产品检测报告" />
                </div>

                <label class="form-label col-1">图片ID：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfo2" id="faddinfo2" placeholder="如：40" />
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">图片名称：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfoname3" id="faddinfoname3" placeholder="如：产品检测报告" />
                </div>
                <label class="form-label col-1">图片ID：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfo3" id="faddinfo3" placeholder="如：40" />
                </div>
                <label class="form-label col-1">图片名称：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfoname4" id="faddinfoname4" placeholder="如：产品检测报告" />
                </div>
                <label class="form-label col-1">图片ID：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfo4" id="faddinfo4" placeholder="如：40" />
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">图片名称：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfoname5" id="faddinfoname5" placeholder="如：产品检测报告" />
                </div>

                <label class="form-label col-1">图片ID：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfo5" id="faddinfo5" placeholder="如：40" />
                </div>
                <label class="form-label col-1">图片名称：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfoname6" id="faddinfoname6" placeholder="如：产品检测报告" />
                </div>

                <label class="form-label col-1">图片ID：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfo6" id="faddinfo6" placeholder="如：40" />
                </div>
            </div>
            <div class="row cl">
                <label class="form-label col-1">图片名称：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfoname7" id="faddinfoname7" placeholder="如：产品检测报告" />
                </div>

                <label class="form-label col-1">图片ID：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfo7" id="faddinfo7" placeholder="如：40" />
                </div>
                <label class="form-label col-1">图片名称：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfoname8" id="faddinfoname8" placeholder="如：产品检测报告" />
                </div>

                <label class="form-label col-1">图片ID：</label>
                <div class="formControls col-2">
                    <input type="text" class="input-text" name="faddinfo8" id="faddinfo8" placeholder="如：40" />
                </div>
            </div>

            <div class="row cl">
                <div class="col-6 col-offset-4">
                    <button class="btn btn-primary radius" type="submit" id="btsub1">提交</button>&nbsp;&nbsp;
		
				<button onclick="layer_close();" class="btn btn-default radius" type="button">返回</button>&nbsp;&nbsp;&nbsp;&nbsp;
                    <button class="btn btn-secondary radius" type="button" onclick="showimginfo()" id="Button1">预览</button>
                    <button class="btn btn-secondary radius" type="button" onclick="showimginfo2()" id="Button2">生成</button>
                </div>
            </div>
            生成的二维码如下<br>
            <div id="qrcode"></div>
        </form>
    </div>
    <script src="../hcjsui/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../lib/layui/layui.js"></script>
    <script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script>
    <script type="text/javascript" src="../lib/Validform/5.3.2/Validform.js"></script>
    <script type="text/javascript" src="../lib/layer/1.9.3/layer.js"></script>
    <script src="../hcjsui/js/_Define.js" type="text/javascript"></script>
    <script type="text/javascript" src="../js/hcui.js"></script>
    <script type="text/javascript" src="../js/hcui_au.js"></script>
    <script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="../lib/jquery.qrcode.min.js"></script>
    <!--以下为多选择下拉ggggggggggggg-->
    <link rel="stylesheet" href="../homepage/css/bootstrap.min.css" type="text/css" />
    <!-- <script type="text/javascript" src="../homepage/js/bootstrap.min.js"></script>

    <script type="text/javascript" src="../homepage/js/bootstrap-multiselect.js"></script>
    <link rel="stylesheet" href="../homepage/css/bootstrap-multiselect.css" type="text/css" />-->
    <script type="text/javascript">
        HcUiAuloadInfoAuto = false;//将自动加载，设置为false（禁用自动加载）
        //var loadisOk = 1;
        hcui_ajaxasync = false;
        //本页面 
        spsetBaseNoBt("yw_baseinfo", "id", "yw_baseinfo as T", "*", "#tablelist", "baseinfo1", "种植物", "baseinfo1");
        //种植物
        hcdoselbyPost("id,fv1 as name", "yw_baseinfo", "type=1 and maintype=1", "", "", "id",
               function (data) {
                   SetSelectWithArrayIdName("#ffv3", data);
                   if (uiform) uiform.render('');//这个好像不用再保留了
               });
        //基地
        hcdoselbyPost("BranchID as id,BranchName as name", "mrbranch", "type='本部'", "", "", "id",
               function (data) {
                   SetSelectWithArrayIdName("#ffv1", data);
                   //loadisOk--;
                   //if (loadisOk <= 0 && auhcotype == "edit") {
                   //    hcui_ajaxasync = true;//恢复异步
                   //    loadInfoById(aumid, function (data) {
                   //        loadback(data);
                   //    });
                   //}
               });

        hcui_ajaxasync = true;        var uiform = null;
        //加载处理
        function loadin() {
            layui.use(['form'], function () {
                uiform = layui.form();
                //因为这个慢，所在加载要从这个开始
                loadInfoById(aumid, function (data) {
                    console.log(data);
                    loadback(data);
                });
            });

        } 
        function loadback(data) {
            uiform.render();//这个不能去掉,坑啊        }

        //重写  提交前数据处理
        function hcrBeforeSub() {
            $("#ffv2").val($('#ffv1 option:selected').text());
            $("#ffv4").val($('#ffv3 option:selected').text());
        }

        function showimginfo() {
            window.open("../rv.html?wid=" + $("#ffv1").val() + "&pid=" + $("#ffv3").val());

        }
        function showimginfo2() {
            $('#qrcode').qrcode({ width: 100, height: 100, text: "http://js.hcrain.cn/rv.html?wid=" + $("#ffv1").val() + "&pid=" + $("#ffv3").val() });

        }

        ///1030

    </script>
</body>
</html>
